<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Test09</title>
</head>
<body>
    <script type="text/javascript">
        var a = prompt("请输入您的真实年龄");
        if (a<18){
            console.log("长大再来，网吧不欢迎你！");
            alert("长大再来，网吧不欢迎你！")
        }else {
            console.log("欢迎光临，聚缘网吧给你家的温暖！");
            alert("欢迎光临，聚缘网吧给你家的温暖！")
        }
    </script>
</body>
</html>